home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 27.zip
/
BS1 part 27
/
Brillance_d1.adf
/
Install
< prev
next >
Wrap
Text File
|
1993-08-23
|
23KB
|
699 lines
;**********************************************************************
;
; Install - Brilliance installation script.
;
; $VER: Brilliance_Install 1.0 (30.7.93)
; $Release: 1.0 $
; $Revision: 1.18 $
; $Date: 1993/07/30 17:06:05 $
;
;**********************************************************************
; Vars
; HDMode - TRUE for HD installation, FALSE for Diskette.
; DestAppDir - Target directory to install Brilliance (including Brilliance, e.g. Work:Brilliance) (HD-only).
; This is used instead @default-dest, although for HD installation, the 2 should be the same.
; SerialNumber - User's serial number as entered into an (askstring)
; InstFlags - set of INSTB_ bits to install (HD-only).
; KS2.0 - set to TRUE if Kickstart 36 or higher, FALSE otherwise.
; --------------------- Defines
; serial number length
(set SERIALNUM_Length 24)
; user level enum
(set
USER_Novice 0
USER_Average 1
USER_Expert 2
)
; installation set flags
(set
INSTB_Brilliance 0
INSTB_TrueBrilliance 1
INSTB_Tutorial 2
INSTB_ImagesAndPalettes 3
INSTF_Brilliance (shiftleft 1 INSTB_Brilliance)
INSTF_TrueBrilliance (shiftleft 1 INSTB_TrueBrilliance)
INSTF_Tutorial (shiftleft 1 INSTB_Tutorial)
INSTF_ImagesAndPalettes (shiftleft 1 INSTB_ImagesAndPalettes)
INSTF_All (BITOR INSTF_Brilliance INSTF_TrueBrilliance INSTF_Tutorial INSTF_ImagesAndPalettes)
)
; set KS2.0 to TRUE if ks version >= 36, FALSE otherwise
(set KS2.0 (>= (shiftright (getversion) 16) 36))
; library descriptions
(set
#asllib-desc (cat
" The Workbench 2.1 release of \"asl.library\" contains the Screen Mode requester used by Brilliance. "
"Since the initial Workbench 2.0 release of asl.library did not contain the Screen Mode requester, "
"the 2.1 release is included with Brilliance to give Workbench 2.0 owners access to this feature without "
"upgrading to Workbench 2.1.\n"
)
#dctvlib-desc (cat
" \"dctv.library\" provides application support for reading and writing DCTV images. "
"TrueBrilliance uses this library to translate DCTV pictures and animations to true color.\n"
)
#iffparselib-desc (cat
" \"iffparse.library\" provides IFF file read and write support functions used by Brilliance. "
"Commodore distributes this file as part of Workbench 2.0, but may also be used with Kickstart 1.3.\n"
)
)
; patch descriptions
(set
#setpatch-desc (cat
" \"SetPatch\" is a system patch provided by Commodore to fix a variety of system bugs. "
"SetPatch 1.38, the final SetPatch release for Kickstart 1.3, was distributed as part of "
"Workbench Release 1.3.3. SetPatch 1.38 is included with Brilliance for those 1.3 users who have not "
"upgraded to 1.3.3.\n"
)
#setpatchmrgcop-desc (cat
" \"SetPatchMrgCop\" is a patch provided by Digital Creations to fix a variety of display "
"related bugs in all versions of the Amiga operating system.\n"
)
)
; misc text bits
(set
#copyof-text (if KS2.0 "Copy_of_" "Copy of ")
#serialnum-text "Security Key Serial Number"
)
; misc prompts and help (depends on misc text bits above)
(set
#askdisk-prompt-fmt (cat
"\n\nInsert the %s copy of Brilliance Disk %ld in any diskette drive."
)
#installsys-desc-fmt (cat
"Description of %s:\n"
"%s\n"
)
#installsys-prompt-fmt (cat
"\n\nInstalling \"%s\" to your system disk or partition."
)
#intro-text (cat
"This utility can only be used to install Brilliance on your Hard Disk. "
"For floppy just copy or use the master diskettes.\n"
)
)
; --------------------- procedure GetSrcDiskDesc
;
; NAME
; GetSrcDiskDesc
;
; FUNCTION
; Return source disk description based on HDMode state
;
; INPUTS
; HDMode - global variable indicating installation mode.
;
; RESULTS
; Either "Master" or "Working" depending on HDMode state.
(procedure GetSrcDiskDesc
(if HDMode "Master" "Working")
)
; --------------------- procedure AskDisk1, 2, 3
;
; NAME
; AskDisk1
; AskDisk2
; AskDisk3
;
; FUNCTION
; Ask for Brilliance Disks by disk label. Sensitive to HDMode to
; determine whether it should ask for working or master copy.
;
; INPUTS
; HDMode - indicates installation mode.
;
; RESULTS
; None
(procedure AskDisk1 (
(askdisk
(dest "Brilliance1")
(prompt (#askdisk-prompt-fmt (GetSrcDiskDesc) 1))
(help @askdisk-help)
)
(working)
))
(procedure AskDisk2 (
(askdisk
(dest "Brilliance2")
(prompt (#askdisk-prompt-fmt (GetSrcDiskDesc) 2))
(help @askdisk-help)
)
(working)
))
(procedure AskDisk3 (
(askdisk
(dest "Brilliance3")
(prompt (#askdisk-prompt-fmt (GetSrcDiskDesc) 3))
(help @askdisk-help)
)
(working)
))
; --------------------- procedure SysInstall
;
; NAME
; SysInstall
;
; FUNCTION
; Library / Patch installation.
; Does common HD/FD patch and library installation
; This assumes client knows that this stuff is on Disk 2
;
; INPUTS
; HDMode - indicates installation mode.
;
; RESULTS
; None
;
; LOCAL VARS
; DestCDir
; LibName
; i
(procedure SysInstall (
; ask for correct disk
(AskDisk2)
; install libraries
(set i 0)
(while (set LibName (select i "asl.library" "dctv.library" "iffparse.library" ""))
(if
; test library applicability and new than existing version (avoid prompting expert users to install an older version)
(AND
(select i KS2.0 TRUE TRUE) ; @@@ must match above library list
(> (getversion (tackon "Brilliance2:libs" LibName)) (getversion (tackon "LIBS:" LibName)))
)
; TRUE case
(copylib
(source (tackon "Brilliance2:libs" LibName))
(dest "LIBS:")
(confirm)
(prompt (#installsys-prompt-fmt LibName))
(help
(#installsys-desc-fmt "library"
(select i #asllib-desc #dctvlib-desc #iffparselib-desc) ; @@@ must match above library list
)
@copylib-help
)
)
)
(set i (+ i 1))
)
; update SetPatch if not 2.0
; @@@ if minimum OS detection stuff is bumped to 2.0, this can be removed
(if (NOT KS2.0)
(
; ask user where SetPatch is. set location in DestCDir (default to C:)
(set DestCDir (askdir
(prompt "In which directory should \"SetPatch\" updated?")
(help
(#installsys-desc-fmt "patch" #setpatch-desc)
" SetPatch must be installed in the C directory of your boot partition or diskette "
"in order for it to be found by your Startup-Sequence. "
"You may need to examine your boot environment before "
"choosing the appropriate location for SetPatch.\n"
"\n"
"Standard locations of SetPatch:\n"
" Diskette-based Amiga - C:\n"
" A500 with A591 - C:\n"
" A2000 with A2091 - C:\n"
" A2000 with A2090A - Boot:C\n"
" A2000 with A2090 - Workbench1.3:C\n"
" A3000 - C:\n"
"\n"
@askdir-help
)
(default "C:")
))
; see if we need to update SetPatch
; ask expert user's to confirm updating SetPatch, otherwise just copy it
; (sort of like doing my own copylib here)
; (use getsum because SetPatch 1.38 and earlier have no version tag)
; @@@ this assumes that SetPatch 1.38 is the absolute newest available SetPatch
(if (<> (getsum (tackon DestCDir "SetPatch")) (getsum "Brilliance2:c/SetPatch"))
(if
(if ; return TRUE if user is not an expert, or an expert user chooses Proceed
(= @user-level USER_Expert)
(askbool
(prompt
(#installsys-prompt-fmt "SetPatch")
"\n\n"
"Version to install: 1.38\n"
"Version currently installed: (unknown)\n"
"\n"
"Destination Drawer to Copy to:\n"
DestCDir
)
(help
(#installsys-desc-fmt "patch" #setpatch-desc)
@copylib-help
)
(choices "Proceed with Copy" "Skip This Part")
)
TRUE
)
; TRUE case from above if
(copyfiles
(source "Brilliance2:c/SetPatch")
(dest DestCDir)
)
)
)
)
)
; update SetPatchMrgCop in C: if newer
; (doing my own version test to avoid prompting expert users to install an older version)
(if (> (getversion "Brilliance2:c/SetPatchMrgCop") (getversion "C:SetPatchMrgCop"))
(copylib
(source "Brilliance2:c/SetPatchMrgCop")
(dest "C:")
(confirm)
(prompt (#installsys-prompt-fmt "SetPatchMrgCop"))
(help
(#installsys-desc-fmt "patch" #setpatchmrgcop-desc)
@copylib-help
)
)
)
; add SetPatchMrgCop in user-startup if it was installed (even if not just installed)
(if (exists "C:SetPatchMrgCop")
(startup @app-name
(prompt
"\n\nSome instructions need to be added to \"S:user-startup\" "
"so that your system will be properly configured to use Brilliance."
)
(help
" The command \"SetPatchMrgCop\" will be added to your \"S:user-startup\". "
"This will cause it to be run every time you boot your system.\n"
"\n"
(#installsys-desc-fmt "patch" #setpatchmrgcop-desc)
@startup-help
)
(command
" if exists c:SetPatchMrgCop\n"
" SetPatchMrgCop\n"
" endif\n"
)
)
)
; run SetPatchMrgCop
(run "Brilliance2:c/SetPatchMrgCop"
(confirm)
(prompt
"\n\n\Run the patch program \"SetPatchMrgCop\" now?"
)
(help
" SetPatchMrgCop will be run now if select the \"Proceed\" button.\n"
"\n"
"Description of patch:\n"
#setpatchmrgcop-desc
)
)
))
; --------------------- procedure ValidateSerialNumber
;
; NAME
; ValidateSerialNumber
;
; FUNCTION
; Check if SerialNumber is valid.
;
; INPUTS
; SerialNumber - containing serial number to check
;
; RESULTS
; TRUE if SerialNumber is valid, FALSE otherwise
;
; LOCAL VARS
; i
; nchars
;
; BUGS
; Only counts non-blank characters, doesn't check to see if each character is valid.
(procedure ValidateSerialNumber (
(set
i 0
nchars 0
)
(while (< i (strlen SerialNumber))
(
(if (<> (substr SerialNumber i 1) " ") (set nchars (+ nchars 1)))
(set i (+ i 1))
)
)
(= nchars SERIALNUM_Length)
))
; --------------------- procedure SerializeFile
;
; NAME
; SerializeFile
;
; FUNCTION
; Installs serial number to the SERIAL_NUMBER tool type of the named file's icon.
; Does nothing if file's icon doesn't exist.
;
; INPUTS
; serialize_dir - directory containing file to serialize.
; serialize_file - name of file to serialize (not containing ".info").
; SerialNumber - containing serial number to install.
;
; RESULTS
; None
(procedure SerializeFile (
(if (exists (tackon serialize_dir (cat serialize_file ".info")))
(
(transcript "Serialize file \"" (tackon serialize_dir serialize_file) "\".")
(tooltype
(dest (tackon serialize_dir serialize_file))
(settooltype "SERIAL_NUMBER" SerialNumber)
(confirm)
(prompt
"\n\nInstalling your " #serialnum-text " in \"" serialize_file "\"."
"\n\n" #serialnum-text ":\n"
SerialNumber
"\n\nDrawer Containing Program to Serialize:\n"
serialize_dir
)
(help
" Brilliance and TrueBrilliance must be installed with a valid "
#serialnum-text " before they can be run. "
"If you select the \"Proceed\" button, your "
#serialnum-text " will be installed into the named program."
)
)
)
)
))
; --------------------- Welcome
; check os version
; @@@ requires at least workbench 1.3
(if (< (shiftright (getversion "LIBS:version.library") 16) 34)
(abort "Brilliance requires Workbench Release 1.3 or greater.")
)
; display welcome text
(set OldLevel (user USER_Expert))
(message
; prompt
"CARNAGE presents Brilliance! (sans key :)\n"
"\n"
#intro-text
"\n"
" This version is intended as a convenience for owners who find the security key a "
"bothersome load on their game port. This version also serves as a "
"preview for non-owners. If you will be a serious user of this program, "
"please support the authors by purchasing your own registered copy."
(help
" CARNAGE Presents: Brilliance!\n"
"call:\n"
" ______________ ___ __________ ____________\n"
" \\____ \\____ \\/ / / /\\____ \\/ _/\\_____/\n"
" / ___/ _ /\\ \\_\\ \\/ _ / _/ \\/ ___/\n"
" /__/ /__//__/____/____/__//__/\\_____/_____/ TO\n"
" ____________________ ___ ____________ ___\n"
" \\____ \\_____/____ \\/ / / /_ __/ \\/ /\n"
" / / ___// _ / /__/ / / / \\_ /\n"
" /__/\\__\\____/__//__/_____/__/ /__/ /__/\n"
" anthr0x canadian hq\n"
"\n"
"Code & Crack by: Entity Orig. & Art by: Rectifyre"
)
)
(user OldLevel)
; get user level
(welcome)
; --------------------- Get Installation Type (Hard Disk / Diskette)
;
; Set HDMode to TRUE if user asked for Hard Disk, FALSE otherwise.
(set OldLevel (user USER_Expert)) ; ask all users
(set HDMode (= (askchoice
(prompt
#intro-text
"\nInstallation method:"
)
(help
"Only choice:\n"
" \"Hard Disk\" -- You will be prompted for partition/dir name.\n"
"\n"
"Select PROCEED to install or ABORT to cancel.\n"
)
(choices "Hard Disk")
(default 0)
) 0))
(user OldLevel)
; --------------------- Get Serial Number No need for this routine when
; installing the CARNAGE version.
; Set SerialNumber to typed in serial #.
; Does limited validation of serial number
;(set SerialNumber "")
;(set retry 0)
;(until
; (ValidateSerialNumber)
; (
; (set OldLevel (user USER_Expert)) ; ask all users
; (set SerialNumber (askstring
; (prompt
; "Enter the " #serialnum-text " exactly as it appears on the self-adhesive labels "
; "from the Security Key envelope included with your Brilliance package."
; (if retry (cat "\n\nInvalid " #serialnum-text ". Please try again."))
; )
; (help
; " You are being asked to enter the " (cat SERIALNUM_Length) "-character "
; #serialnum-text " printed on the labels from the Security Key envelope "
; "included with your Brilliance package. "
; "You will not be able to run Brilliance or TrueBrilliance until the programs have "
; "been installed with a valid " #serialnum-text ".\n"
; "\n"
; "Sample " #serialnum-text ":\n"
; " 1234 5678 9ABC DEF0 1234 5678\n"
; "\n"
; @askstring-help
; )
; (default SerialNumber)
; ))
; (user OldLevel)
; (set retry 1)
; )
;)
; --------------------- Do installation
;
; Performs HD/FD installation and serialization based on HDMode from above
; set global delete options such that average and expert users
; will be prompted for delete protected files.
(delopts "oknodelete" "force" "askuser")
(if HDMode
; HD installation/serialization of programs and data
; Set DestAppDir and @default-dest to target installation directory and make directory
(
(set DestAppDir
(tackon
(askdir
(prompt "In which disk or drawer should the drawer called \"Brilliance\" be created?")
(help
" The Brilliance programs and data files will be installed in a new drawer "
"called \"Brilliance\". You are being asked where this new drawer should be created. "
"If you select \"Work:\", for example, then a new drawer named \"Work:Brilliance\" will be created, "
"and Brilliance will be installed into this new drawer.\n"
"\n"
@askdir-help
)
(default @default-dest)
)
"Brilliance"
)
)
(makedir DestAppDir (infos)) ; make directory w/o confirmation; we just got permission from above (askdir)
(set @default-dest DestAppDir) ; set @default-dest to DestAppDir to cause log file to be put in the right spot.
; get list of stuff to install
(set InstFlags
(askoptions
(prompt "Select which Brilliance programs and data files to install to \"" DestAppDir "\":")
(choices
"Brilliance - Register Program"
"TrueBrilliance - True Color Program"
"Tutorial"
"Images and Palettes"
)
(help
"You may choose to install any of the following programs:\n"
" \"Brilliance\" -- Register paint and animation program.\n"
" \"TrueBrilliance\" -- True Color / HAM paint and animation program.\n"
"\n"
"You may also choose to install any of the following sets of data files:\n"
" \"Tutorial\" -- A drawer containing files to be used with the "
"Tutorial section in the Brilliance Manual.\n"
" \"Images and Palettes\" -- Two separate drawers containing sample pictures "
"and useful palettes.\n"
"\n"
@askoptions-help
)
(default INSTF_All)
)
)
(complete 0)
; disk 1 ReadMe installation
; install ReadMe if either program is requested
(if (IN InstFlags INSTB_Brilliance INSTB_TrueBrilliance)
(
(AskDisk1)
(copyfiles
(source "Brilliance1:ReadMe")
(dest DestAppDir)
(infos)
)
(copyfiles
(source "Brilliance1:CARNAGE.ReadMe")
(dest DestAppDir)
(infos)
)
(copyfiles
(source "Brilliance1:Keys.txt")
(dest DestAppDir)
(infos)
)
)
)
(complete 5)
; disk 1 program installation
; copy Brilliance if requested and adjust program icon
(if (IN InstFlags INSTB_Brilliance)
(
(AskDisk1)
(copyfiles
(source "Brilliance1:Brilliance")
(dest DestAppDir)
(infos)
)
(copyfiles
(source "Brilliance1:Bril")
(dest DestAppDir)
)
(tooltype
(dest (tackon DestAppDir "Brilliance"))
(noposition)
(swapcolors)
)
)
)
(complete 33)
; disk 2 program installation
; copy TrueBrilliance if requested and adjust program icon
(if (IN InstFlags INSTB_TrueBrilliance)
(
(AskDisk2)
(copyfiles
(source "Brilliance2:TrueBrilliance")
(dest DestAppDir)
(infos)
)
(copyfiles
(source "Brilliance2:TBril")
(dest DestAppDir)
)
(tooltype
(dest (tackon DestAppDir "TrueBrilliance"))
(noposition)
(swapcolors)
)
)
)
(complete 50)
; program serialization and system installation (disk 2)
; Not serialized for preview purposes. Once you have
; bought the package (which you should) place your
; number in the icon tool-types as stated in the manual.
; (set
; serialize_dir DestAppDir
; serialize_file "Brilliance"
; )
; (SerializeFile)
; (set
; serialize_dir DestAppDir
; serialize_file "TrueBrilliance"
; )
; (SerializeFile)
(SysInstall)
(complete 67)
; disk 3 data installation
; install Tutorial if requested
(if (IN InstFlags INSTB_Tutorial)
(
(AskDisk3)
(copyfiles
(source "Brilliance3:")
(dest DestAppDir)
(choices "Tutorial") ; @@@ done this way rather than (all) to avoid having to do an extra tackon in dest
(infos)
)
)
)
; install Images and Palettes if requested
(if (IN InstFlags INSTB_ImagesAndPalettes)
(
(AskDisk3)
(copyfiles
(source "Brilliance3:")
(dest DestAppDir)
(choices "Images" "Palettes")
(infos)
)
)
)
(complete 100)
)
)